import request from '@/utils/request'

export const getMouldInfoList = (params) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getMouldInfoList',
    params
  })
}
// 部门
export const getDeptsByOrgId = (params) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/workflow/getDeptsByOrgId',
    params
  })
}

// 待办列表
export const getWaitDoList = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/workFlowAnt/getWaitApproveWorkFlows',
    params,
    data
  })
}
// 已办列表
export const getHadDoList = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/workFlowAnt/getDoneApproveWorkFlows',
    params,
    data
  })
}
// 进度查看
export const queryProcess = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/workFlowAnt/approveProcessPage',
    params,
    data
  })
}
// 代办查看删除
export const deleteBackLog = (data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/workFlowAnt/deleteWaitApproveBusiness',
    data
  })
}
// 进度查看删除
export const deleteProcess = (data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/workFlowAnt/deleteProcessBusiness',
    data
  })
}
// 获取审核人列表
export const getAuditUserList = (params) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/workflow/getAuditUserList',
    params
  })
}
// 获取工作项的类型
export const getAuditCount = (params) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/workFlowAnt/getMouldsOfUser',
    params
  })
}
// // 获取进度查看的条数
// export const getScheduleCount = (params) => {
//   return request({
//     method: 'post',
//     url: '/human-manage/workFlowProcess/queryBusinessTypeLsit',
//     params
//   })
// }

// 审核动态按钮
export const getNextWorkFlowConditions = (params) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/workFlowAnt/getNextWorkFlowConditions',
    params
  })
}

// 审批业务流程
export const approveWorkFlow = (params) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/workFlowAnt/approveWorkFlow',
    params
  })
}

// 获取所有类型
export const getAllMouldInfoList = (params) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/workFlowAnt/getAllMouldInfoList',
    params
  })
}

// 获取所有操作状态
export const getSysDictionaryByValue = (params) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getSysDictionaryByValue?value=FlowAuditStatus',
    params
  })
}

// 中间表数据绑定
export const bindData = (params) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/flowtest/bind',
    params
  })
}

export default {
  getMouldInfoList,
  getDeptsByOrgId,
  getWaitDoList,
  getHadDoList,
  queryProcess,
  deleteBackLog,
  deleteProcess,
  getAuditUserList,
  getAuditCount,
  // getScheduleCount,
  getNextWorkFlowConditions,
  approveWorkFlow,
  getAllMouldInfoList,
  getSysDictionaryByValue,
  bindData
}
